<?php
namespace app\shouyin\model;

use think\Model;

class Operation extends Model
{
    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    // 自动写入时间戳
    protected $autoWriteTimestamp = true;
    public function hasShop()
    {
        return $this->hasOne('app\shop\model\Shop', 'id', 'shop_id');
    }
    public function hasUser()
    {
        return $this->hasOne('app\user\model\User', 'id', 'user_id');
    }
    public function hasRoom()
    {
        return $this->hasOne('app\shop\model\Room', 'id', 'room_id');
    }
}
